package com.enzo.moredb.controller.core;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dc.base.mapper.account.AccountUserMapper;
import com.enzo.moredb.mapper.core.PsBaseInfoMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
/**
* 多源数据库测试接口
* @author Enzo
* @date 2020-12-3
*/
@Api(tags = "多源数据库测试接口")
@RestController
@RequestMapping("psBaseInfo")
public class PsBaseInfoController {
    @Resource
    private PsBaseInfoMapper baseInfoMapper;
    @Resource
    private AccountUserMapper userMapper;


    @GetMapping("/get1")
    @ApiOperation("查询数据源1数据列表")
    public List listData1() {
        List res = baseInfoMapper.selectList(new QueryWrapper<>());
        return res;
    }

    @GetMapping("/get2")
    @ApiOperation("查询数据源2数据列表")
    public List listData2() {
        List res = userMapper.selectList(new QueryWrapper<>());
        return res;
    }
}
